#include <bits/stdc++.h>
using namespace std;
int a, b, c;
int sum = 0;

int main() {
    cin >> a >> b >> c;

    int a1 = c / a;
    int b1 = c / b;
    for (int i = 0; i <= a1; i++) {
        for (int j = 0; j <= b1; j++) {
            if (i * a + j * b == c)
                sum++;
        }
    }
    cout << sum;
    return 0;
}